using System;
using System.Data;
using Sedna.Core.Controls.Actions.Support;

namespace Sedna.Core.Controls.Actions
{
	/// <summary>
	/// Summary description for LoadBrandDataAction.
	/// </summary>
	public class LoadBrandDataAction : BaseFilterAction
	{
//		private IBrandApi configurationApi;

		public LoadBrandDataAction()
		{
		}

//		public IBrandApi ConfigurationApi
//		{
//			get { return configurationApi; }
//			set { configurationApi = value; }
//		}

		protected override System.Collections.ICollection GetResultSet(object filter)
		{
			DataTable dt = new DataTable();
			DataColumn dcId = new DataColumn("ID", typeof(int));
			DataColumn dcCode = new DataColumn("CODE", typeof(string));
			DataColumn dcName = new DataColumn("NAME", typeof(string));
			dt.Columns.AddRange(new DataColumn[] { dcId, dcCode, dcName });
			for (int i = 1; i <= 4; i++)
			{
				DataRow dr = dt.NewRow();
				dr["ID"] = i;
				dr["CODE"] = "Brand" + i;
				dr["NAME"] = "Brand " + i;
				dt.Rows.Add(dr);
			}
			dt.AcceptChanges();
			
			return dt.DefaultView;
		}


	}
}
